package com.lzk.FeignClients;

import com.lzk.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
//openfeign配置hystrix熔断功能，FeignClient指定服务应用名称，fallbackFactory 托底类
@FeignClient(value = "user-server",fallbackFactory = UserFeiginClientFallbackFactory.class)
@RequestMapping("user")
public interface UserFeiginClient {



    @GetMapping("getById/{id}")
    User getById(@PathVariable("id") Long id);


}
